import { axios } from '@/utils/request'

export function selectByNull() {
  return axios({
    url: '/sys/sysMenu/selectByNull',
    method: 'get'
  })
}

export function selectPage(parameter) {
  return axios({
    url: '/sys/sysMenu/selectList/' + parameter.pageNum + '/' + parameter.pageSize,
    method: 'get'
  })
}

export function selectAll(parameter) {
  return axios({
    url: '/sys/sysMenu/selectAll',
    method: 'get'
  })
}

export function selectByRoleId(parameter) {
  return axios({
    url: '/sys/sysMenu/selectByRoleId/' + parameter,
    method: 'get'
  })
}

export function save(parameter) {
  return axios({
    url: '/sys/sysMenu/addOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/sys/sysMenu/delete/' + parameter,
    method: 'get'
  })
}

export function updateOther(parameter) {
  return axios({
    url: '/sys/sysMenu/updateOther',
    method: 'post',
    params: parameter
  })
}

